FROM openjdk:8-jdk-alpine
RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.7/main/ > /etc/apk/repositories
ARG version

#RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories && \
#    echo "http://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
RUN echo "Asia/shanghai" > /etc/timezone
ENV TZ=Asia/Shanghai
RUN apk add --no-cache fontconfig ttf-dejavu

ADD target/ucs-auth.jar ucs-auth.jar
#RUN echo "47.18.251.85 peer1" > /etc/hosts
#RUN echo "47.18.251.86 peer2" > /etc/hosts
#RUN echo "47.18.251.89 peer1mirror" > /etc/hosts
#RUN echo "47.18.251.90 peer2mirror" > /etc/hosts
ENTRYPOINT java -Xms512m -Xmx1027m -Djava.security.egd=file:/dev/urandom -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5007 -jar /ucs-auth.jar
